package com.company.management.domain.reward;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("T_USER")
public class TalentUser {
    @TableId(type = IdType.AUTO)
    private Integer userId;
    private String userName;

    private String password;

    private String tel;

    private String gender;

    private Integer deptId;

    private Integer postId;

    private Date hireDate;

    private Integer empStatus;

    private String company;

    private BigDecimal score = BigDecimal.ZERO;

    private Integer isAdmin;

    private Date createDateTime;

    private byte[] avatar;

    public boolean checkIsAdmin(){
        if(this.getIsAdmin() == null){
            return false;
        }
        if(this.getIsAdmin() == 1){
            return true;
        }
        return false;
    }
}
